#ifndef QABSTRACTSTYLESHEETEDITOR_H
#define QABSTRACTSTYLESHEETEDITOR_H


#include "../../sharedLib/stylesheet/stylesheetstruct.h"


#include <QWidget>

namespace CORELIB
{

    class QAbstractStylesheetWidget : public QWidget
    {
        Q_OBJECT
    public:
        explicit QAbstractStylesheetWidget(QWidget *parent = 0);


        QString getSheet();

        tagStylesheetItem   getItem();
        virtual void                setItem(const tagStylesheetItem& item);

        virtual  void       takeResource()=0;
        void    setType(const QString type);
        void    setDefault(const tagStylesheetItem &item);

        void    reset();
        void    clear();
    protected:
        void    makeStylesheet();
    signals:
        void    stylesheetChanged();
    public slots:
    protected:
        tagStylesheetItem   m_item;
        tagStylesheetItem   m_default;
        QString         m_stylesheet;
        QString         m_type;
    };

}
#endif // QABSTRACTSTYLESHEETEDITOR_H
